package com.finance.report.bean.pojo;

import com.finance.framework.lang.BaseObject;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author: gly
 * @Date: Created in 14:54 2017/4/19
 */
@Data
public class ManSalary extends BaseObject {

    /**
     * 配送员工号
     */
    private String userCode;
    /**
     * 配送员姓名
     */
    private String userName;

    /**
     * 月份 格式：2017-03
     */
    private String salaryMonth;

    /**
     * 出勤天数
     */
    private Integer workDays;

    /**
     * 首件单量
     */
    private Integer majorTotal;

    /**
     * 拖件单量
     */
    private Integer minorTotal;

    /**
     * 首件配费
     */
    private BigDecimal majorFeeTotal;

    /**
     * 拖件配费
     */
    private BigDecimal minorFeeTotal;

    /**
     * 基础配费
     */
    private BigDecimal baseFee;


    /**
     * 合计商家配费
     */
    private BigDecimal supplierFee;

    /**
     * 月收入合计
     */
    private BigDecimal totalFee;

    /**
     * 站点名称
     */
    private String orgName;

    private List<ManSalaryDetail> manSalaryDetailList;

    private int version;

    @Override
    public boolean equals(Object object) {
        if (object instanceof ManSalary) {
            ManSalary manSalary = (ManSalary) object;
            return manSalary.getId().equals(super.getId());
        }
        return false;
    }

    @Override
    public int hashCode() {
        return (this.userCode+this.salaryMonth).hashCode();
    }

}